﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <title>Jasmine Spec Runner</title>

  <link rel="stylesheet" type="text/css" href="Tests/jasmine/jasmine.css">
  <script type="text/javascript" src="Tests/jasmine/jasmine.js"></script>
  <script type="text/javascript" src="Tests/jasmine/jasmine-html.js"></script>

   <meta http-equiv="Content-type" content="text/html; charset=utf-8">
    <script src="scripts/jquery-2.0.2.js"></script>
    <script src="scripts/Box2dWeb-2.1.a.3.js"></script>

    <script src="scripts/entities.js"></script>
    <script src="scripts/gameengine.js"></script>
    <script src="scripts/keyboard.js"></script>
    <script src="scripts/levelsdata.js"></script>
    <script src="scripts/loader.js"></script>
    <script src="scripts/polyfills.js"></script>
    <script src="scripts/gamecontroler.js"></script>
    <script src="scripts/hero.js"></script>
    <script src="scripts/physicssimulation.js"></script>
    <script src="scripts/script.js"></script>
    <link href="styles/gamescreens.css" rel="stylesheet" />
    <link href="styles/menustyles.css" rel="stylesheet" />

  <script type="text/javascript">
    (function() {
      var jasmineEnv = jasmine.getEnv();
      jasmineEnv.updateInterval = 1000;

      var htmlReporter = new jasmine.HtmlReporter();

      jasmineEnv.addReporter(htmlReporter);

      jasmineEnv.specFilter = function(spec) {
        return htmlReporter.specFilter(spec);
      };

      var currentWindowOnload = window.onload;

      window.onload = function() {
        if (currentWindowOnload) {
          currentWindowOnload();
        }
        execJasmine();
      };

      function execJasmine() {
        jasmineEnv.execute();
      }

    })();
  </script>

</head>

<body>
     <div id="gamecontainer">
        <canvas id="gamecanvas" width="800" height="600" class="gamelayer"></canvas>

        <div id="scorescreen" class="gamelayer">
            <img id="togglemusic" src="images/icons/sound.png">
            <img src="images/icons/prev.png" onclick="gameControler.restartLevel();">
            <span id="score">Score: 0</span>
        </div>

        <div id="gamestartscreen" class="gamelayer">
            <img src="images/icons/play.png" alt="Play Game" onclick="gameControler.start()">
            <br />
            <img src="images/icons/settings.png" alt="Settings">
        </div>

        <div id="levelselectscreen" class="gamelayer">
        </div>

        <div id="loadingscreen" class="gamelayer">
            <div id="loadingmessage"></div>
        </div>

        <div id="endingscreen" class="gamelayer">
            <div>
                <p id="endingmessage">The Level Is Over Message</p>
                <p id="playcurrentlevel" onclick="game.restartLevel();">
                    <img
                        src="images/icons/prev.png">
                    Replay Current Level
                </p>
                <p id="playnextlevel" onclick="game.startNextLevel();">
                    <img
                        src="images/icons/next.png">
                    Play Next Level
                </p>
                <p id="returntolevelscreen" onclick="game.showLevelScreen();">
                    <img
                        src="images/icons/return.png">
                    Return to Level Screen
                </p>
            </div>
        </div>

    </div>

    <canvas id="debugcanvas" width="1300" height="600" style="border: 1px solid black;"></canvas>
     <div id="wrapper">
        <div id="left">
            <fieldset>
                <legend>High Scores:
                </legend>
                <table class="scoreTable">
                    <tr>
                        <td class="loadingScores">Loading Scores...</td>
                    </tr>
                </table>
            </fieldset>

        </div>

        <div id="right">
            <div id="loginForm">
                <form action="http://www.copy-paste-ninja.moshensky.com/php/login.php" method="post" class="ajax">
                    <fieldset>
                        <legend>Login</legend>
                        <table>
                            <tr>
                                <td>Username:</td>
                                <td>
                                    <input class="input-bar" type="text" name="username" placeholder="username" />
                                </td>
                            </tr>
                            <tr>
                                <td>Password:</td>
                                <td>
                                    <input class="input-bar" type="password" name="password" placeholder="password" /></td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <input class="button-style" type="submit" value="login" />
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                </form>
            </div>

            <div id="registerForm">
                <form action="http://www.copy-paste-ninja.moshensky.com/php/register.php" method="post" class="ajax">
                    <fieldset>
                        <legend>Register</legend>
                        <table>
                            <tr>
                                <td>Username:</td>
                                <td>
                                    <input class="input-bar" type="text" name="username" placeholder="username" />
                                </td>
                            </tr>
                            <tr>
                                <td>Password:</td>
                                <td>
                                    <input class="input-bar" type="password" name="password" placeholder="password" />
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <input class="button-style" type="submit" value="register" />
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                </form>

            </div>
        </div>

        <div class="fb-like" data-href="http://developers.facebook.com/docs/reference/plugins/like" data-send="true" data-width="100%" data-show-faces="true"></div>
    </div>
    <div id="hiddenForms">
        <form action="http://www.copy-paste-ninja.moshensky.com/php/uploadScore.php" method="post" class="ajax">
            <input class="input-bar" type="text" name="username" placeholder="username" />
            <input class="input-bar" type="text" name="score" placeholder="score" />
            <input class="button-style" type="submit" value="upload" />
        </form>


        <!--<h1>Get high score</h1>
    <p>Празни полета връща всички резултати.</p>
    <p>При попълнено поле за username без полето date връща всички резултати за потребителя.</p>
    <p>При попълнено поле date без полето username връща всички резултати за дадената дата.</p>
    <p>При попълнени пвсички полета връща връща резултат по точно зададениете данни.</p>-->
        <form action="http://www.copy-paste-ninja.moshensky.com/php/getScore.php" method="post" class="ajax">
            <input class="input-bar" type="text" name="username" placeholder="username" />
            <input class="input-bar" type="text" name="date" placeholder="date" />
            <input id="getScore" class="button-style" type="submit" value="GetScore" />
        </form>
    </div>


    <script src="scripts/server.js"></script>
     <script type="text/javascript" src="Tests/EngineTests.js"></script>
      <script type="text/javascript" src="Tests/HeroTests.js"></script>
      <script type="text/javascript" src="Tests/KeyboardTests.js"></script>
      <script type="text/javascript" src="Tests/LevelsDataTest.js"></script>
      <script type="text/javascript" src="Tests/LoadingTests.js"></script>
</body>
</html>
